<?php
	function display_classes_and_test_init_creation($teacher_id, $result)
	{
		if(!isset($_GET['test_id']))
		{
			echo "<div class=\"edit-exam-title\"><img src='images/new-test.png' id='NewTestIcon'>Create New Exam</div>";
			echo "<br/><br/><br/><form method=\"post\" action=\"test.php?test_func=create\" id=\"test-creation\">";
			echo "<span class='label'>Course</span>";
			echo "<select name=\"classes_list\" id=\"classes_list\">";
			echo $result;
			echo "</select>";
			echo "<br /><span class='label'>Exam Name</span>"."<input type=\"text\" name=\"test-name\" id=\"test-name\" size=\"40\">";
			
			echo "<br /><span class='label'>Start Date</span>". "<input type=\"text\" name=\"test_start_date\" id=\"test_start_date\" />";
			echo "<div id=\"single-day-container\">";
			echo "<input type=\"checkbox\" name=\"single-day-check\" id=\"single-day-check\">Single-Day Test?";
			echo "</div>";
			echo "<span id=\"end-date-area\"><span class='label'>End Date</span>". "<input type=\"text\" name=\"test_end_date\" id=\"test_end_date\" /></span>";

			echo "<div id=\"test-limit-container\">";
			echo "<span class='label'>Test Length</span><input type=\"text\" id=\"test-limit\" name=\"test-limit\"><span id='minutelbl'>minute(s)</span>";
			echo "</div>";
			echo "<br/>";
			echo "<div id=\"adv-settings-opt\"><span id=\"show-adv-text\"> <span id=\"adv-sett-toggle\"><img src='images/arrow-small.png' class='sectionarrow rotate'></span>Advanced Settings</span></div>";
			echo "<div id=\"adv-sett\" class=\"adv-sett\"><div id=\"adv-sett-1\"><span class='AdvancedLabel'>Number of Questions</span><input type=\"text\" class=\"adv-sett-width adv-sett-1\" size=3 id=\"num-questions\" name=\"num-questions\"></div>";
			echo "<div id=\"adv-sett-2\"><span class='AdvancedLabel'>Number of Points</span><input type=\"text\" class=\"adv-sett-width adv-sett-2\" size=3 id=\"num-points\" name=\"num-points\"></div>";
			echo "<div id=\"adv-sett-3\"><span class='AdvancedLabel'>Shuffle questions?</span><input type=\"checkbox\" name=\"shuffle-check\" id=\"shuffle-check\" class=\"adv-sett-width adv-sett-3\"></div>";
			echo "</div>";
			echo "<br/><br/>";
			echo "<input type=\"submit\" id=\"sbutton\" value=\"Continue\" />";
			echo "</form>";
			echo "<br/>";
		}
		else
		{
			//session_start();

			echo "<script type=\"text/javascript\" src=\"JS\\QA2.js\"></script>";
			echo "<div class=\"edit-exam-title\">Edit Exam</div>";
			echo "<div id=\"test-details\"></div>";
			echo "<div id=\"question-area\"></div>";
			echo "<div id=\"question-holding-area\"></div>";
			echo "<div class=\"question-container\" id=\"question-container\"></div>";
			echo "<pre>".print_r($_SESSION['test_data'])."</pre>";
			session_write_close();
		}
		return;
	}
?>